package com.dct.activity.member;


import com.dct.activity.R;

import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.os.Bundle;
import android.app.Activity;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.SlidingDrawer;
import android.widget.TextView;

@SuppressWarnings("deprecation")
public class Login extends Activity implements TextWatcher {
	TextView selection;
	AutoCompleteTextView edit;
	@SuppressWarnings("deprecation")
	private SlidingDrawer mDialerDrawer;
	
	String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
			"consectetuer", "adipiscing", "elit", "morbi", "vel",
			"ligula", "vitae", "arcu", "aliquet", "mollis",
			"etiam", "vel", "erat", "placerat", "ante",
			"porttitor", "sodales", "pellentesque", "augue", "purus"};
    
    @SuppressWarnings("deprecation")
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        
        
        mDialerDrawer = (SlidingDrawer) findViewById(R.id.slidingDrawer);
        
        mDialerDrawer.setOnDrawerScrollListener(new SlidingDrawer.OnDrawerScrollListener() {
            @Override
            public void onScrollStarted() {
                Log.v("SlidingDrawerActivity", "onScrollStarted()");
            }
            @Override
            public void onScrollEnded() {
                Log.v("SlidingDrawerActivity", "onScrollEnded()");
            }
        });
        
        mDialerDrawer.setOnDrawerOpenListener(new SlidingDrawer.OnDrawerOpenListener() {
            @Override
            public void onDrawerOpened() {
            	//edit.clearListSelection();
                Log.v("SlidingDrawerActivity", "onDrawerOpened()");
            }
        });
        
        mDialerDrawer.setOnDrawerCloseListener(new SlidingDrawer.OnDrawerCloseListener() {
            @Override
            public void onDrawerClosed() {
                Log.v("SlidingDrawerActivity", "onDrawerClosed()");
            }
        });

       /* selection = (TextView)findViewById(R.id.selection);
        
        edit = (AutoCompleteTextView)findViewById(R.id.edit);
        edit.setAdapter(new ArrayAdapter(this, android.R.layout.simple_dropdown_item_1line, items));
        edit.addTextChangedListener(this); */
    }
    
    public void onTextChanged(CharSequence s, int start, int before, int count) {
    	selection.setText(edit.getText());
    }

	@Override
	public void afterTextChanged(Editable s) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void beforeTextChanged(CharSequence s, int start, int count,
			int after) {
		// TODO Auto-generated method stub
		
	}
}